Skip to content

test(billing): cover config parsing - #442

Closed
erayack wants to merge 1 commit into
Layr-Labs:masterfrom
erayack:add-billing-config-tests
Closed

erayack wants to merge 1 commit into
Layr-Labs:masterfrom
erayack:add-billing-config-tests

Conversation

@erayack

@erayack erayack commented Jun 21, 2026 •

Copy link
Copy Markdown

Summary

Adds focused tests for billing configuration parsing and validation. This pins existing ReadConfig() defaults/env overrides and Config.Check() mock-mode safety behavior without changing production code.

Related context: #316 also touched billing mock-mode safety. This PR is complementary: it does not change production behavior or guards; it only adds focused tests that pin the existing Config.Check() mock-mode + Stripe secret conflict behavior and ReadConfig() env parsing.

Before / After

flowchart LR
  subgraph Before
    A1[Billing env vars] --> B1[ReadConfig / Config.Check]
    B1 --> C1[Behavior existed but config contracts were not directly tested]
  end
  subgraph After
    A2[Billing env vars] --> B2[ReadConfig / Config.Check]
    T2[config_test.go] --> B2
    B2 --> C2[Defaults, overrides, mnemonic precedence, referral parsing, and mock-mode conflict are pinned]
  end
Loading

Validation

  • gofmt -w coordinator/billing/config_test.go && go test ./coordinator/billing

@vercel

vercel Bot commented Jun 21, 2026

Copy link
Copy Markdown

@erayack is attempting to deploy a commit to the EigenLabs Team on Vercel.

A member of the Team first needs to authorize it.

@erayack erayack closed this by deleting the head repository Jun 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant